import Fraction from "./fraction"

/**
 * @interface Rational
 */
export default class Rational {
    #type
    /**
     * 
     * @param {any} value 
     */
    constructor(type = "rational") { 
        this.#type = type
    }   
    
    get type() {
        return this.#type
    }

    /**
     * 
     * @returns {Fraction|null}
     */
    toFraction() {
        return null
    }

    /**
     * @returns {Rational|null}
     */
    add(value) {
        return null
    }

    /**
     * @returns {Rational|null}
     */
    sub(value) {
        return null
    }

    /**
     * @returns {Rational|null}
     */
    mul(value) {
        return null
    }

    /**
     * @returns {Rational|null}
     */
    div(value) {
        return null
    }

    /**
     * @returns {Int|Fraction|null}
     */
    get reciprocal() {
        return null
    }

    /**
     * @returns {any}
     */
    get value() {
        return null
    }
    
    static is(value) {
        return value instanceof Rational
    }
}